-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Namespace Support #29
Draft: Namespace Support #29
Conversation
@sp-sophia-labs Have you tried using See https://github.com/ros-planning/navigation2/blob/main/nav2_bringup/launch/bringup_launch.py#:~:text=bringup_cmd_group%20%3D%20GroupAction,%3Dnamespace)%2C for an example. |
@roni-kreinin I've seen this while trying to make navigation2 work with namespaces. I haven't tried this yet for the rest of the code but it's definitely a more elegant solution to the entry duplication that we have right now. I'll try it out once I'm done with the navigation issues |
Closing this as #35 is now merged. |
Description
The goal of this PR is to enable namespaces for the turtlebot4 robot to be able to spawn multiple instances in the same simulation space without resorting to isolated networks
Type of change: new feature. This change does not fix any open issue
How has this been tested?
We have created a project with dependencies pointing to specific commits (submodules) here: https://github.com/sp-sophia-labs/turtlebot4_multi_sim (details in the dependency section below). Reviewers may clone the project and replicate exactly what we use for testing. You can follow the readme from the project or use the following:
Launch the world and the first turtlebot4 instance:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py namespace:=robot_0 robot_name:=robot_zero
Alternatively, launching the robot without namespaces is still available:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py
In a separate terminal, spawn another turtlebot4 instance with different name, namespace and pose:
ros2 launch turtlebot4_ignition_bringup turtlebot4_spawn.launch.py namespace:=robot_1 robot_name:=robot_one y:=1
You can change the x, y, z, and yaw params to spawn the robot where needed
Once the gazebo simulation has started, you can modify the TurtleBot4 HMI field to reflect on the new robot name. It defaults to "turtlebot4"
This will correctly map the Turtlebot4's simulated interface to one of your robots
Dependencies
We have modified other packages outside of turtlebot4_simulator to be able to spawn multiple turtlebot4 in simulation with namespaces. Here is the list with a short description of the reasons for the changes:
create3_sim Draft: Namespace Support iRobotEducation/create3_sim#189, resolving dependencies
rclcpp ros2/rclcpp@81d6f89, no official release yet
We'll update the dependencies above according to PR and release status
Known Issues
While topics, nodes and frames look good with namespaces, navigation2 still refuses to work properly with namespaces. We are still trying to figure out the correct configuration for the amcl node (cf. https://github.com/sp-sophia-labs/turtlebot4/blob/feat/turtlebot4_namespace/turtlebot4_navigation/config/nav2.yaml). Help would be appreciated
Checklist